<%@ Control Language="C#" AutoEventWireup="true" CodeFile="breadcrumb.ascx.cs" Inherits="forums_controls_forums_breadcrumb" %>
<asp:MultiView runat="server" ID="mviewBreadcrumb" ActiveViewIndex="0">
    <asp:View runat="server" ID="viewUsePostback">
        <asp:LinkButton runat="server" ID="btnRoot"
            Text="(root)"
            OnCommand="NewForumSelected" />
        <asp:Repeater runat="server" ID="rptBreadcrumbPostback">
            <HeaderTemplate>
                <%# Server.HtmlEncode(Seperator) %>
            </HeaderTemplate>
            <SeparatorTemplate>
                <%# Server.HtmlEncode(Seperator) %>
            </SeparatorTemplate>
            <ItemTemplate>
                <asp:LinkButton runat="server" ID="btnForum"
                    Text='<%# Server.HtmlEncode(Eval("Name").ToString()) %>'
                    CommandArgument='<%# Eval("ID") %>'
                    OnCommand="NewForumSelected"/>
            </ItemTemplate>
            <FooterTemplate>
                <%# Helpers.StringHelper.FormatIfExists("{0}{1}", Seperator, FooterText)%>
            </FooterTemplate>
        </asp:Repeater>    
    </asp:View>
    <asp:View runat="server" ID="viewUseLink">
        <asp:HyperLink runat="server" ID="lnkRoot"
            Text='<%# RootItemText %>'
            NavigateUrl='<%# RootItemUrl %>' />
        <asp:Repeater runat="server" ID="rptBreadcrumbLink">
            <HeaderTemplate>
                <%# Helpers.StringHelper.SafeFormat(Seperator) %>
            </HeaderTemplate>
            <SeparatorTemplate>
                <%# Helpers.StringHelper.SafeFormat(Seperator)%>
            </SeparatorTemplate>
            <ItemTemplate>
                <asp:HyperLink runat="server" ID="lnkForum"
                    Text='<%# Server.HtmlEncode(Eval("Name").ToString()) %>'
                    NavigateUrl='<%# GetNavigateUrl(Eval("ID")) %>'/>
            </ItemTemplate>
            <FooterTemplate>
                <%# Helpers.StringHelper.FormatIfExists("{0}", Seperator, FooterText)%>
                <asp:Hyperlink runat="server" ID="lnkFooter"
                    Text='<%# FooterText %>'
                    NavigateUrl='<%# FooterUrl %>' />
            </FooterTemplate>
        </asp:Repeater>    
    </asp:View>
</asp:MultiView>
